<?php
/**
 * Joomla! 1.5 component Joomla Community Polls
 *
 * @version $Id: joomlacommunitypolls.php 2009-08-10 03:45:15 svn $
 * @author Maverick
 * @package Joomla
 * @subpackage Joomla Community Polls
 * @license GNU/GPL
 *
 * The Joomla Community Polls allows the members of the Joomla website to create and manage polls from the front-end.
 * The administrator has the powerful tools provided in the back-end to manage the polls published by all users.
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

require_once JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'constants.php';

$document	= & JFactory::getDocument();
$document->addStyleSheet(JURI::base(true).'/components/com_joomlacommunitypolls/assets/css/styles.css');

// Require the base controller
require_once JPATH_COMPONENT.DS.'controller.php';

// Require specific controller if requested
if($controller = JRequest::getVar('controller', '')) {
	require_once (JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php');
}

// Initialize the controller
$classname	= 'JoomlacommunitypollsController'.$controller;
$controller = new $classname( );

// Perform the Request task
$controller->execute( JRequest::getVar('task') );
$controller->redirect();
?>